﻿Namespace SRAGWM

    Public Class MS
        Inherits System.Web.UI.Page

        Private Shared _verificar As Integer
        Private Shared _map As Object


        Public Function GetMap() As Object

            If _verificar = False Then
                _map = CreateObject()
                _verificar = True
            End If

            Return _map

        End Function
        Private Function CreateObject() As Object

            Dim objSesMgr
            'Receber o MapServer
            objSesMgr = Server.CreateObject("GMWebMap.MapServerManager")

            Return objSesMgr.MapServer("")

        End Function
    End Class
End Namespace